package dao;

import bean.Goods;
import bean.CartItem;

import java.util.List;

public interface BookDao {

    public int addBook(Goods goods);

    public int deleteBookById(Integer id);

    public Goods queryById(Integer id);

    public List<Goods> queryAllBook();

    public List<Goods> pagingQuery(int begin, int pageSize,String classifyName);

    public List<Goods> pagingQueryByPrice(int begin, int pageSize, double min, double max);

    public int updateBook(Goods goods);

    public int getTotal(String classifyName);

    public int[] syncStockAndSales(List<CartItem> cartItems);


    public int getToTalWithPrice(double min, double max);


    public List<Goods> searchByKeyword(String keyword);

}
